<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>spoc</title>
        <script src="./jquery.min.js"></script>
        <script src="../Vue/vue2/vue.min.js"></script>
        <!-- <script src="./buffer.js"></script> -->
        <!-- <script src="./crypot.js"></script> -->
        <!-- <script src="./forge.js"></script> -->
        <!-- <script src="./forge.min.js"></script> -->
        <!-- <script src="./eas.js"></script> -->
        <!-- <script src="./utils.js"></script> -->
        <script src="./demo.js"></script>
    </head>
    <body>
        <div id="jq" style="padding: 30px">
            <div style="display: flex; align-items: baseline">
                <span>明文：</span>
                <textarea name="query" id="query" cols="10" rows="5" style="flex: 1">{"pageNo":1,"pageSize":12,"t":{"type":0,"courseStatus":"","sort":"1"}}</textarea>
            </div>
            <div style="display: flex; align-items: baseline; margin-top: 20px">
                <span>密文：</span>
                <textarea name="params" id="params" cols="10" rows="5" style="flex: 1">xw/o+luCAqwZaidtbkoh/SdZp3vZHA3xjTwB+NgptJOxFz++0oAVqnC0rfwKUnylKiJ6UZkS90K4zZzy65mayif8BaWT78vBCV9wSbOZye1qtofDOog=</textarea>
            </div>
            <button id="btn1" style="margin: 20px">加密</button>
            <button id="btn2" style="margin: 20px">解密</button>

            <!-- 结果 -->
            <div>
                加密：<textarea name="result1" id="result1" cols="10" rows="5" style="width: 100%" disabled></textarea>
                解密：<textarea name="result2" id="result2" cols="10" rows="5" style="width: 100%" disabled></textarea>
            </div>
        </div>

        <script>
            $("#btn1").click(function () {
                let query = $("#query").val().trim();
                console.log("明文：", query);
                let result = entryCode(query);
                $("#result1").val(result);
            });
            $("#btn2").click(function () {
                let params = $("#params").val().trim();
                console.log("密文：", params)
                let result = decryptCode(params);
                $("#result2").val(result);
            });
        </script>
    </body>
</html>
